package com.qijia.travel.domain;

import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.Date;

import com.qijia.travel.helper.DateHelper;
import com.qijia.travel.helper.ObjectHelper;

public class TouristWorkDetail {
	
	// agencyMission
	private Integer agencyMissionId;
	private String agencyMissionSn;
	private String agencyMissionName;

	// detail
	private Integer touristGroupDetailId;
	private String touristGroupSn;
	private Integer guideId;
	private String guideName;
	private Date startDt;
	private Float continuedDate;
	private Float actualContinuedDate;
	private Date endDt;

	// tourist group
	private Integer touristGroupId;
	private String touristGroupType;
	private String customerSourse;
	private Integer customerNum;
	private String touristFile;

	// profit
	private Integer touristGroupProfitId;
	private BigDecimal profitAmount;

	// reward
	private Integer touristGroupRewardId;
	private BigDecimal rewardAmount;

	// tream
	private String treamName;
	private Integer guideType;

	public String getAgencyMissionSn() {
		return agencyMissionSn;
	}

	public void setAgencyMissionSn(String agencyMissionSn) {
		this.agencyMissionSn = agencyMissionSn;
	}

	public String getAgencyMissionName() {
		return agencyMissionName;
	}

	public void setAgencyMissionName(String agencyMissionName) {
		this.agencyMissionName = agencyMissionName;
	}

	public Integer getTouristGroupDetailId() {
		return touristGroupDetailId;
	}

	public void setTouristGroupDetailId(Integer touristGroupDetailId) {
		this.touristGroupDetailId = touristGroupDetailId;
	}

	public String getTouristGroupSn() {
		return touristGroupSn;
	}

	public void setTouristGroupSn(String touristGroupSn) {
		this.touristGroupSn = touristGroupSn;
	}

	public Integer getGuideId() {
		return guideId;
	}

	public void setGuideId(Integer guideId) {
		this.guideId = guideId;
	}

	public String getGuideName() {
		return guideName;
	}

	public void setGuideName(String guideName) {
		this.guideName = guideName;
	}

	public String getStartDt() {
		if (startDt == null)
			return "";
		else {
			try {
				return DateHelper.parseToString(startDt, DateHelper.yyyyMMdd);
			} catch (Exception e) {
				return "";
			}
		}
	}

	public void setStartDt(Date startDt) {
		this.startDt = startDt;
	}
	
	public Date getStartDate(){
		return this.startDt;
	}
	
	public Date getEndDate(){
		return this.endDt;
	}
	
	public String getEdDate(){
		if (endDt == null)
			return "";
		else {
			try {
				return DateHelper.parseToString(endDt, DateHelper.yyyyMMdd);
			} catch (Exception e) {
				return "";
			}
		}
	}

	public Float getContinuedDate() {
		return continuedDate;
	}

	public void setContinuedDate(Float continuedDate) {
		this.continuedDate = continuedDate;
	}

	public Float getActualContinuedDate() {
		return actualContinuedDate;
	}

	public void setActualContinuedDate(Float actualContinuedDate) {
		this.actualContinuedDate = actualContinuedDate;
	}

	public Integer getTouristGroupId() {
		return touristGroupId;
	}

	public void setTouristGroupId(Integer touristGroupId) {
		this.touristGroupId = touristGroupId;
	}

	public String getTouristGroupType() {
		return touristGroupType;
	}

	public void setTouristGroupType(String touristGroupType) {
		this.touristGroupType = touristGroupType;
	}

	public String getCustomerSourse() {
		return customerSourse;
	}

	public void setCustomerSourse(String customerSourse) {
		this.customerSourse = customerSourse;
	}

	public Integer getCustomerNum() {
		return customerNum;
	}

	public void setCustomerNum(Integer customerNum) {
		this.customerNum = customerNum;
	}

	public String getTouristFile() {
		return touristFile;
	}

	public void setTouristFile(String touristFile) {
		this.touristFile = touristFile;
	}

	public Integer getTouristGroupProfitId() {
		return touristGroupProfitId;
	}

	public void setTouristGroupProfitId(Integer touristGroupProfitId) {
		this.touristGroupProfitId = touristGroupProfitId;
	}

	public BigDecimal getProfitAmount() {
		return profitAmount;
	}

	public void setProfitAmount(BigDecimal profitAmount) {
		this.profitAmount = profitAmount;
	}

	public Integer getTouristGroupRewardId() {
		return touristGroupRewardId;
	}

	public void setTouristGroupRewardId(Integer touristGroupRewardId) {
		this.touristGroupRewardId = touristGroupRewardId;
	}

	public BigDecimal getRewardAmount() {
		return rewardAmount;
	}

	public void setRewardAmount(BigDecimal rewardAmount) {
		this.rewardAmount = rewardAmount;
	}

	public String getTreamName() {
		return treamName;
	}

	public void setTreamName(String treamName) {
		this.treamName = treamName;
	}

	public Integer getGuideType() {
		return guideType;
	}

	public void setGuideType(Integer guideType) {
		this.guideType = guideType;
	}

	public Integer getAgencyMissionId() {
		return agencyMissionId;
	}

	public void setAgencyMissionId(Integer agencyMissionId) {
		this.agencyMissionId = agencyMissionId;
	}

	public String toString() {
		Method[] ms = this.getClass().getDeclaredMethods();
		String s = "[旅游细节表]";
		for (Method m : ms) {
			if (m.getName().indexOf("get") != 0)
				continue;
			try {
				s += m.getName() + "-->"
						+ ObjectHelper.invokeMethod(this, m.getName()) + " \n ";
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return s;
	}

	public String getEndDt() {
		if (endDt == null)
			return "";
		else {
			try {
				return DateHelper.parseToString(endDt, DateHelper.yyyyMMdd);
			} catch (Exception e) {
				return "";
			}
		}
	}

	public void setEndDt(Date endDt) {
		this.endDt = endDt;
	}
}
